#pragma once
#include "stdafx.h"
#include "Config.h"


void WINAPI StartAllKillThread();
void WINAPI StopAllKillThread();

void WINAPI SendBaseInfo(HANDLE hPipe);
LPWSTR WINAPI GetName(DWORD baseAddr);
DWORD WINAPI GetGlod();
DWORD WINAPI decrypt(DWORD baseAddr);
void WINAPI encrypt(DWORD baseAddr,DWORD value);
DWORD WINAPI GetAttribute(DWORD baseAddr,DWORD offset);
void WINAPI SetAttribute(DWORD baseAddr,DWORD offset,DWORD value);
void WINAPI ChangeChannel(DWORD index);
void WINAPI MouseLeftClick(int x,int y,DWORD num);
void WINAPI MouseRightClick(int x,int y,DWORD num);
void WINAPI QuickMouseRightClick(int x,int y,DWORD num,DWORD delay = 0);
void WINAPI ChangeRole(DWORD index);
void WINAPI	SimpleSendPacketCall(DWORD cmd);
void WINAPI EnterMonsterMap();
BOOL WINAPI IsNotInMap();
void WINAPI SelectMonsterMap(int index,int level);
void WINAPI CloseAllWindow();
void WINAPI BackendCloseAllWindow();
void WINAPI FrontCloseAllWindow();
void WINAPI KeyPress(DWORD vk,DWORD num=1);
void WINAPI KeyPress2(DWORD vk,DWORD num=1);
void WINAPI KeyUp(DWORD vk,DWORD time = 300);
void WINAPI KeyDown(DWORD vk,DWORD time = 300);
PDWORD WINAPI GetObjectArray(PDWORD size);
PDWORD WINAPI GetObjectArrayByType(DWORD type,PDWORD size);
BOOL WINAPI IsMonster(DWORD monsterAddr);
BOOL WINAPI IsLordMonster(DWORD monsterAddr);
BOOL WINAPI IsOther(DWORD monsterAddr);
PMap WINAPI CreateMap();
DWORD WINAPI GetCurMapAddr();
void WINAPI GetCoordinateInt(DWORD baseAddr,PDWORD px,PDWORD py,PDWORD pz);
void WINAPI DestroyAllBuilding(DWORD buildingType);
void WINAPI MoveTo(DWORD baseAddr,DWORD x,DWORD y,DWORD z);
DWORD WINAPI AttackMonsterList(PMap map,PDWORD objectArray,DWORD size);
BOOL WINAPI AttackMonster(DWORD monsterAddr);
PDWORD WINAPI GetMonsterArray(PDWORD size);
PDWORD WINAPI GetAllAttackedArray(PDWORD size);
DWORD WINAPI KillAllMonsterAtCurrentMap(PMap map);
void WINAPI ModifyScore();
DWORD WINAPI GetKillMonsterNumber();
void WINAPI IfExceedSellAllItem(PMap map);
DWORD WINAPI GetCurrentWeight();
DWORD WINAPI GetMaxWeight();
void WINAPI SellItem(DWORD baseAddr,DWORD num);
void WINAPI RepairItem(DWORD baseAddr);
void WINAPI DissealItem(DWORD baseAddr);
void WINAPI BuyItem(DWORD baseAddr,DWORD shopIndex);
void WINAPI SellAllItem(BOOL excludeWeapon = FALSE);
void WINAPI SellAllItemByThread(BOOL excludeWeapon = FALSE);
void WINAPI OpenBag();
void WINAPI ConfirmDialog(DWORD baseAddr);
void WINAPI ConfirmCurrentDialog();
void WINAPI GetBagItems(PDWORD* list,PDWORD listSize);
void WINAPI GetPetItems(PDWORD* list,PDWORD listSize);
void WINAPI PickUpItems(PMap map);
PDWORD WINAPI GetPickedArray(PDWORD size);
DWORD WINAPI GetCurrentFatigue();
DWORD WINAPI GetMaxFatigue();
void WINAPI DeleteMaps(PPMap maps);
void WINAPI DeleteMap(PMap map);
int WINAPI NearestGate(PGate g1,PGate g2);
PMap WINAPI GoToNextMap(PPMap maps,PDWORD mapsSize,PMap curMap);
BOOL WINAPI IsAllGatePassed(PPMap maps,DWORD mapsSize);
void WINAPI RecoverAllEquipmentDurability(BOOL flag = TRUE);
void WINAPI RecoverEquipmentDurability(DWORD baseAddr,BOOL flag);
void WINAPI UpdateRoleInfo();
void WINAPI NewPickupItem();
void WINAPI NewSingtonPickupItem(DWORD itemAddr);
void WINAPI MoveAllMonsterTo(PDWORD monsterArray,DWORD size,DWORD x,DWORD y,DWORD z);
void WINAPI MultipleAttack(DWORD multiple);
DWORD WINAPI GetCurExperience();
DWORD WINAPI GetMaxExperience();
void WINAPI FullBlood();
void WINAPI FullMagic();
void WINAPI Invincible(DWORD param);
void WINAPI InvincibleMonster(PDWORD objectArray,DWORD size);
DWORD WINAPI EquipItemFromBag(DWORD index,DWORD baseAddr);
DWORD WINAPI GetCurrentWeaponAttack();
DWORD WINAPI GetWeaponAttack(DWORD weaponAddr);
void  WINAPI AutoEquipWeapon();
BOOL WINAPI AutoBackCity();
DWORD WINAPI OpenShop(DWORD index);
DWORD WINAPI GetShopItemAddr(DWORD index,DWORD itemIndex);
BOOL WINAPI AutoBuyWeapone();
DWORD WINAPI GetItemLevel(DWORD baseAddr);
BOOL WINAPI  IsItemVocationOK(DWORD itemAddr);
void WINAPI  MenuCall(DWORD index);
void WINAPI  CountinueChallengeCall();
void WINAPI  FounderAttack(PMap map);
void WINAPI  FounderAttackWithSkill(PMap map,PDWORD objectArray,DWORD size,DWORD key,BOOL islast,DWORD mX,DWORD mY,DWORD wX,DWORD wY,DWORD attackTimes = 0);
void WINAPI  FounderAttackWithSkillSigle(PMap map,PDWORD objectArray,DWORD size,DWORD key,BOOL islast,DWORD wX,DWORD wY);

void WINAPI  FounderAttackAction(PMap map,DWORD key,DWORD wX,DWORD wY,DWORD multiple,BOOL islast);

void WINAPI  InitVocation();
void WINAPI  UpgradeFounderSkill();
BOOL WINAPI FounderBackCity();
PDWORD WINAPI GetFounderSkillArray(PDWORD size);
void WINAPI FrontKeyPress(DWORD vk,DWORD num=1);
void WINAPI FrontMouseRightClick(int x,int y,DWORD num);

DWORD WINAPI GetNeedSetMagic();

DWORD WINAPI GetRoleNumber();
void WINAPI RecoverBlood(DWORD monsterAddr);
void WINAPI InitDriver();
Win32SysType WINAPI GetOsVerion();
BOOL WINAPI LoadNTDriver(char* lpszDriverName,char* lpszDriverPath);
BOOL WINAPI ControlNTDriver(char * szSvrName,DWORD code,char* InputBuffer,DWORD cbin,char* OutputBuffer, DWORD cbout, PDWORD dwOutput);
void WINAPI InputText(char* text,int len);
BOOL WINAPI CreateRole();
void WINAPI CreateRoleName(char* name,int len);
void WINAPI AutoCreateRole();
void WINAPI SkipMove();
void WINAPI GoToPlusBlood();
bool WINAPI IsConnected();
bool WINAPI IsIllegalMode();
void WINAPI NotifyConsole(DWORD message,DWORD wParam = 0,DWORD lParam = 0);
